Skip to content

Re-skin Wix cookie consent banner + settings modal for the dark theme - #38

Merged
guyofeck merged 1 commit into
mainfrom
fix/cookie-banner-css-a11y
Jun 2, 2026
Merged

Re-skin Wix cookie consent banner + settings modal for the dark theme#38
guyofeck merged 1 commit into
mainfrom
fix/cookie-banner-css-a11y

Conversation

@guyofeck

@guyofeck guyofeck commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

What

Wix's injected cookie-consent UI ([data-hook^="ccsu-"]) ships a light "wix.com" look — white surfaces, Madefor brand font, outlined pill buttons — that clashes on this dark site (and, setting no text color of its own, inherits our light --fg onto white → unreadable). This re-skins the bottom banner and the "Advanced" settings modal onto the site's design tokens.

All overrides are global !important rules on the stable data-hooks (the consent bundle injects its stylesheet after ours and regenerates its hashed classes each build), in Layout.astro — the single shared <head> on every page, with is:global because the banner is appended outside our component tree.

Area Change
Surfaces Dark card backgrounds, accent primary, site box-shadows
Fonts Inter body; every control in --mono (incl. "Advanced"/decline links, which otherwise fell back to unloaded Madefor → serif)
A11y On-brand :focus-visible rings — the bundle's native ring is built for its light theme and washes out on dark (WCAG 2.4.7 / 1.4.11)
Consent symmetry "Decline all" kept at full --fg so reject reads as an equal-weight choice to accept, not a demoted dark-pattern nudge
Modal Headings in mono scaled to 0.85em so the wider mono glyphs keep the bundle's row footprint (no wrapping / toggle misalignment); panel matched via > section and > div:not([data-hook]) for markup-churn robustness; accent-color themes native toggles

Styling only — no other files touched. Tokens (--bg-card, --accent, …) and welcome.css imports already exist, so it resolves with no new dependencies.

Notes

🤖 Generated with Claude Code

Wix's injected consent UI ([data-hook^="ccsu-"]) ships a light "wix.com"
look (white surfaces, Madefor font, outlined pill buttons) that clashes on
this dark site and inherits our light --fg onto white = unreadable. Re-skin
the bottom banner and the "Advanced" settings modal onto the site's design
tokens, all via global !important rules on the stable data-hooks (the
consent bundle injects its stylesheet after ours and regenerates its hashed
classes each build).

- Dark card surfaces, accent primary, Inter body / mono controls.
- Keyboard focus: on-brand :focus-visible rings (the bundle's native ring is
  built for its light theme and washes out on dark) — WCAG 2.4.7 / 1.4.11.
- Consent symmetry: "Decline all" kept at full --fg so reject reads as an
  equal-weight choice to accept (not a demoted, dark-pattern nudge).
- Pin every banner control (incl. "Advanced"/decline links) to --mono so
  none falls back to the unloaded Madefor (serif) — they declare their own
  font-family, which beats the inherited wrapper rule.
- Modal headings in mono, scaled to 0.85em so the wider mono glyphs keep the
  bundle's row footprint instead of wrapping and misaligning the toggles.
- Modal panel matched via `> section` AND `> div:not([data-hook])`, and
  accent-color on the wrapper to theme native consent toggles.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@guyofeck
guyofeck marked this pull request as ready for review June 2, 2026 10:16
@guyofeck
guyofeck merged commit a40fbc2 into main Jun 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant